import java.util.Scanner;

/**
 * 等差数列
 */
public class ArithmeticSequence {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            int sum = 0;
            int num = scanner.nextInt();
            int begin = 2;
            for (int i=0; i<num; i++) {
                sum += begin;
                begin +=3;
            }
            System.out.println(sum);
        }
    }
}
